package co.th.bjc.md.simulation;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class JdbcTemplate {

	public <T> List<T> executeQuery(String sql, Object[] params, RowMapper<T> rowMapper) throws SQLException {
		List<T> results = new ArrayList<T>();
		ResultSet resultSet = null; //getResultSet(sql, params);
		while (resultSet.next()) {
			results.add(rowMapper.mapRow(resultSet));
		}
		return results;
	}
}
